package com.it.emall.controller;

import com.it.emall.service.DashboardService;
import com.it.emall.utils.ResponseUtils;
import com.it.emall.vo.DashboardVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * 首页仪表盘接口
 */
@RestController
public class DashboardController {


    @Autowired
    private DashboardService dashboardService;

    @GetMapping("/admin/dashboard")
    public Object findDashboard(){
        DashboardVo dashboardVo = dashboardService.selectDashboardData();
        return ResponseUtils.ok(dashboardVo);

    }
}
